<script language="javascript">
$(function(){
	$('form').form({ 
		success:function(data){
			var data = runJson(data);
			if(data.status == 0){
				alertText(data.info, 'error');
			}else{
				alertText(data.info, 'success', 'back');
			}
		}   
	}); 
});
</script>
<div class="box">
	<div class="easyui-panel" title="{$page_title}">
        <div class="datagrid-toolbar">
            <a href="{:U('Apps/index')}" class="easyui-linkbutton" plain="true" iconCls="icon-list">应用列表</a>
            <eq name='ACTION_NAME' value='edit'>
            |
            <a href="{:U('Apps/add')}" class="easyui-linkbutton" plain="true" iconCls="icon-add">添加应用</a>
            </eq>
        </div>
    	<form action="<eq name='ACTION_NAME' value='edit'>{:U('Apps/update')}<else />{:U('Apps/insert')}</eq>&ajax=true" method="post">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
          <tr>
            <td class="label">应用名称：</td>
            <td>
            <input type="text" value="{$vo.app_name}" id="app_name" name="app_name" style="width:200px;" class="easyui-validatebox input" required="true" validType="length[2,20]" />
            </td>
          </tr>
          <tr>
            <td class="label">应用标题：</td>
            <td>
            <input type="text" class="easyui-validatebox input" required="true" validType="length[2,20]" value="{$vo.app_title}" id="app_title" name="app_title" style="width:200px;" />
            </td>
          </tr>
          <tr>
            <td class="label">排序：</td>
            <td>
            <input type="text" class="input" name="sort" id="sort" value="{$vo.sort}" style="width:100px;" />
            </td>
          </tr>
          <tr>
            <td class="label">备注：</td>
            <td>
            <textarea class="input" name="remark" id="remark" style="width:300px; height:100px;">{$vo.remark}</textarea>
            </td>
          </tr>
          <tr>
            <td class="label">&nbsp;</td>
            <td>
            <input type="hidden" name="app_id" value="{$vo.app_id}" />
            <input align="absmiddle" class="button" type="submit" value="保存" id="submits" onclick="return $('form').form('validate')" />
            </td>
          </tr>
        </table>
        </form>
    </div>
</div>